<?php
/**
 * Create By: PhpStorm
 * User: niechenguang
 * File: Circle.php
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;
use app\api\model\page\duobao\AddDuoBaoCart;
use app\api\model\page\duobao\GetDuoBaoByGoods;
use app\api\model\page\duobao\GetDuoBaoCart;
use app\api\model\page\duobao\GetIssuesNumberByNo;
use app\api\model\page\duobao\GetIssuesNumberList;
use app\api\model\page\duobao\GetLuckyList;

use app\api\model\page\duobao\CreateDuobaoOrder;
use think\Request;

class Duobao
{

    protected $param;

    private $objGetDuoBaoByGoods;
    private $objGetIssuesNumberByNo;
    private $objGetIssuesNumberList;
    private $objGetLuckyList;
    private $objCreateDuobaoOrder;
    private $objAddDuobaoCart;
    private $objGetDuoBaoCart;

    public function __construct()
    {
        $this->param = Request::instance()->param();
        $this->objGetDuoBaoByGoods = new GetDuoBaoByGoods();
        $this->objGetIssuesNumberByNo = new GetIssuesNumberByNo();
        $this->objGetIssuesNumberList = new GetIssuesNumberList();
        $this->objGetLuckyList = new GetLuckyList();
        $this->objAddDuobaoCart = new AddDuoBaoCart();
        $this->objCreateDuobaoOrder = new CreateDuoBaoOrder();
        $this->objGetDuoBaoCart = new GetDuoBaoCart();

    }


    public function getDuoBaoByGoods()
    {
        return $this->objGetDuoBaoByGoods->excute($this->param);
    }

    public function getIssuesNumberByNo()
    {
        return $this->objGetIssuesNumberByNo->excute($this->param);
    }

    public function getIssuesNumberList()
    {
        return $this->objGetIssuesNumberList->excute($this->param);
    }

    public function getLuckyList()
    {
        return $this->objGetLuckyList->excute($this->param);
    }

    public function addDuobaoCart()
    {
        return $this->objAddDuobaoCart->excute($this->param);
    }

    public function createDuobaoOrder()
    {
        return $this->objCreateDuobaoOrder->excute($this->param);
    }

    public function getDuoBaoCart()
    {
        return $this->objGetDuoBaoCart->excute($this->param);
    }

}
